package com.wantong.jianpu.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.BaseLoadMoreModule;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.wantong.jianpu.R;
import com.wantong.jianpu.beans.FaultListBean;
import com.wantong.jianpu.utils.XUtils;

/**
 * @author PACY
 * @date 2022/4/25
 * description:
 */
public class FaultRepairAdapter extends BaseQuickAdapter<FaultListBean.RowsDTO, BaseViewHolder> implements LoadMoreModule {
    public FaultRepairAdapter() {
        super(R.layout.faultrepair_item_view);
    }

    @Override
    protected void convert(BaseViewHolder holder, FaultListBean.RowsDTO s) {
        holder.setText(R.id.time_tv,s.getCreateTime()).setText(R.id.name_tv,s.getEquName())
                .setText(R.id.content_tv,s.getComments())
                .setText(R.id.status_tv, XUtils.getStatusName(s.getStatus()))
                .setText(R.id.location_tv,s.getLocationName());


    }

    @Override
    public BaseLoadMoreModule addLoadMoreModule(BaseQuickAdapter<?, ?> baseQuickAdapter) {
        return new BaseLoadMoreModule(baseQuickAdapter);
    }
}
